Platform Explorer / Nuxeo Platform 6.0

Operation AddEntryToMultivaluedProperty (Add entry into multi-valued metadata)

Description

Add value into the field expressed by the xpath parameter. This field must be a multivalued metadata.

'checkExists' parameter enables to add value only if doesn't already exists in the field:

  • if checked, the value will not be added if it exists already in the list
  • if not checked the value will be always added.

    Remark: only works for a field that stores a list of scalars (string, boolean, date, int, long) and not list of complex types.

Operation id AddEntryToMultivaluedProperty
Category Document
Label Add entry into multi-valued metadata
Requires
Since

Parameters

Name Description Type Required Default value
value serializable yes  
xpath string yes  
checkExists boolean no true 
save boolean no true 

Signature

Inputs document, documents
Outputs document, documents

Implementation Information

Implementation Class Class: org.nuxeo.ecm.automation.core.operations.document.AddEntryToMultiValuedProperty
Contributing Component org.nuxeo.ecm.core.automation.coreContrib

JSON Definition

{
  "id" : "AddEntryToMultivaluedProperty",
  "label" : "Add entry into multi-valued metadata",
  "category" : "Document",
  "requires" : null,
  "description" : "Add value into the field expressed by the xpath parameter. This field must be a multivalued metadata.<p> 'checkExists' parameter enables to add value only if doesn't already exists in the field: <ul><li> if checked, the value will not be added if it exists already in the list</li><li>if not checked the value will be always added</li</ul>.<p> Remark: <b>only works for a field that stores a list of scalars (string, boolean, date, int, long) and not list of complex types.<b>",
  "url" : "AddEntryToMultivaluedProperty",
  "signature" : [ "document", "document", "documents", "documents" ],
  "params" : [ {
    "name" : "value",
    "description" : null,
    "type" : "serializable",
    "required" : true,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  }, {
    "name" : "xpath",
    "description" : null,
    "type" : "string",
    "required" : true,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  }, {
    "name" : "checkExists",
    "description" : null,
    "type" : "boolean",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ "true" ]
  }, {
    "name" : "save",
    "description" : null,
    "type" : "boolean",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ "true" ]
  } ]
}